Transiciones
float mx = 0.0;
void setup()
{
size(400, 400);
cursor(CROSS);
}
void draw()
{
background(204);
//---------------------
// aca inserte su codigo
//---------------------
// Actualiza a localización del marcador
float dif = mouseX - mx;
if(abs(dif) > 1.0) {
mx = mx + dif/8.0;
}
// Mantiene el marcador en la pantalla
mx = constrain(mx, 1, width-1);
noStroke();
// Dibuja el rectángulo inferior
fill(255);
rect(0, height-5, width, 5);
// Dibuja el marcador de posición
fill(204, 102, 0);
rect(mx-2, height-5, 4, 5);
}
This entry was posted
on Monday, March 9th, 2015 at 2:30 pm and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.